#include<stdio.h>

int main(){
     int num,a=0,b=0;
     scanf("%d",&num);
     while(num!=0){
         a=num%10;
         b=b*10+a;
         num/=10;
     }
     printf("%d",b);

    return 0;
}